<template>
	<view class="">
		<das-ipt @SearchEvents="searchClick"></das-ipt>
		<view class="content">
			<view class="content-item" v-for="i in list" @tap="$navTo('details?id='+i.id)">
				<image class="item-img" src="../../static/programme1.png" mode=""></image>
				<view class="item-content">
					<text class="content-title">{{i.file_name}}</text>
					<text class="content-time">{{i.createtime_text}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				list:[],
				title:''
			}
		},
		onLoad() {
			this.init()
		},
		methods:{
			searchClick(e) {
				this.title = e
				this.init()
			},
			init() {
				let _this = this
				uni.request({
					url: this.$url + 'relevant.study_data/getstudyDataList',
					method: 'GET',
					header: {
						token: uni.getStorageSync('token')
					},
					data: {
						title: this.title
					},
					success: (res) => {
						if (res.data.code == 1) {
							_this.list = res.data.data
							console.log(_this.list);
						}
					}
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.content{
		padding: 0 23rpx; 
		.content-item{
			padding: 16rpx 0;
			display: flex;
			align-items: center;
			border-bottom: 1rpx solid #DDDDDD;
			.item-img{
				width: 61rpx;
				height: 74rpx;
			}
			.item-content{
				display: flex;
				flex-direction: column;
				margin-left: 14rpx;
				.content-title{
					font-size: 30rpx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #333333;
				}
				.content-time{
					font-size: 24rpx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #999999;
					margin-top: 12rpx;
				}
			}
		}
	}
</style>
